//
//  JSMHeaderCell.m
//  TakeYouTourTogether
//
//  Created by dllo on 15/12/5.
//  Copyright © 2015年 king. All rights reserved.
//

#import "JSMHeaderCell.h"

@implementation JSMHeaderCell
- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}

- (void)createView{
    self.myLable = [[BaseLabel alloc]init];
    [self.contentView addSubview:self.myLable];
    self.lineLable = [[BaseLabel alloc]init];
    [self.contentView addSubview:self.lineLable];
}
- (void)layoutSubviews{
    [super layoutSubviews];
    [self.myLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.contentView).with.insets(UIEdgeInsetsMake(5, 5, 5, 5));
    }];
    self.myLable.font = [UIFont systemFontOfSize:14];
    self.myLable.textAlignment = NSTextAlignmentCenter;
    [self.lineLable mas_makeConstraints:^(MASConstraintMaker *make) {
        make.bottom.equalTo(self.contentView);
        make.top.equalTo(self.contentView.mas_bottom).with.offset(-1);
        make.left.equalTo(self.contentView).with.offset(10);
        make.right.equalTo(self.contentView).with.offset(-10);
    }];
    self.lineLable.layer.borderWidth = 1;
    self.lineLable.layer.borderColor = [[UIColor whiteColor] CGColor];
}

@end
